﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="edit.aspx.cs" Inherits="DTcms.Web.admin.users.user_edit" ValidateRequest="false" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>编辑会员信息</title>
 <link href="../js/ui/skins/Aqua/css/ligerui-all.css" rel="stylesheet" type="text/css" />
<link href="../../Client/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="../../Client/plugins/bootstrap-fileinput-master/css/fileinput.min.css" rel="stylesheet" type="text/css" />
<link href="../../Client/plugins/bootstrap-fileinput-master/css/fileinput.css" rel="stylesheet" type="text/css" />

<link href="../css/admin.css" rel="stylesheet" type="text/css" />
<script src="../js/jquery-1.9.1.min.js" type="text/javascript"></script>
<script src="../js/function.js" type="text/javascript"></script>
<script src="../js/base.js" type="text/javascript"></script>
<script src="../js/dialog.js" type="text/javascript"></script>
<script src="../js/jquery-form.js" type="text/javascript"></script>
<script src="../js/ajax-data.js" type="text/javascript"></script>
</head>
<body class="mainbody">
<form id="form1" runat="server">
<div class="navigation"><a href="javascript:history.go(-1);" class="back">后退</a>首页 &gt; <a href="list.html">会员管理</a> &gt; 编辑会员信息</div>
<div id="contentTab">
    <ul class="tab_nav">
        <li class="selected"><a onclick="tabs('#contentTab',0);" href="javascript:;">基本信息</a></li>
       <%-- <li><a onclick="tabs('#contentTab',1);" href="javascript:;">账户信息</a></li>--%>
    </ul>

    <div class="tab_con" style="display:block;">
        <table class="form_table">
            <col width="150px"><col>
            <tbody>           
         <tr>
                <th>头 像：</th>
                <td>
                    <img id="imgAvatar" style="width:60px; height:60px;" class="left" />
                    <asp:HiddenField ID="txtAvatar" runat="server" />
                    <a href="javascript:;" class="files">
                       <input name="file_user_logo" id="file_user_logo" type="file" multiple="true"/>
                    </a>
                    <span class="uploading">正在上传，请稍候...</span>
                 
                </td>
            </tr>
            <tr>
                <th>微街秀ID：</th>
                <td>
                    <%=Request.QueryString["id"]%>
                </td>
            </tr>
            <tr>
                <th>用户名：</th>
                <td>
                    <asp:HiddenField ID="hidUserName" runat="server" Value="" />
                    <asp:TextBox ID="txtUserName" runat="server" CssClass="txtInput normal" minlength="2" maxlength="100" /><label>*登录的用户名，支持中文。</label>
                </td>
            </tr>
            <tr style="display:none">
                <th>密 码：</th>
                <td><asp:TextBox ID="txtPassword" runat="server" CssClass="txtInput normal required" minlength="6" maxlength="100" TextMode="Password"></asp:TextBox><label>*登录的密码，不填写默认为原来密码。</label></td>
            </tr>
            
            <tr>
                <th>昵 称：</th>
                <td><asp:TextBox ID="txtNickName" runat="server" CssClass="txtInput normal required" maxlength="100"></asp:TextBox><label>*会员的真实姓名或昵称</label></td>
            </tr>
            <tr>
                <th>手 机：</th>
                 <asp:HiddenField ID="hdMobile" runat="server" Value="" />
                <td><asp:TextBox ID="txtMobile" runat="server" CssClass="txtInput normal " maxlength="20"></asp:TextBox><label></label></td>
            </tr>
            <tr>
                <th>QQ号码：</th>
                <td><asp:TextBox ID="txtQQ" runat="server" CssClass="txtInput normal " maxlength="30"></asp:TextBox><label></label></td>
            </tr>
            <tr>
                <th>邮 箱：</th>
                 <asp:HiddenField ID="hdEmail" runat="server" Value="" />
                <td><asp:TextBox ID="txtEmail" runat="server" CssClass="txtInput normal required email" maxlength="100"></asp:TextBox><label>*取回密码时用到。</label></td>
            </tr>
            <tr>
                <th>上级ID：</th>
                <td><asp:TextBox ID="parentId" runat="server" CssClass="txtInput normal " maxlength="30"></asp:TextBox><label>必需填数字，填上级广告商的ID</label></td>
            </tr>
            <tr>
                <th>推荐人ID：</th>
                <td><asp:TextBox ID="agentId" runat="server" CssClass="txtInput normal " maxlength="30"></asp:TextBox><label>必需填数字，填代理商的ID</label></td>
            </tr>
            <tr>
                <th>区域：</th>
                <td> <%= area %> </td>
            </tr>

            <tr>
                <th>状态：</th>
                <td> <input type="hidden" id="state" name="state" value="<%=state %>" />
                <input type="radio" id="rad1" name="rad" value="1" onclick="change(1)" checked="checked" /><label for="rad1">已审核</label>&nbsp;&nbsp;
                <input type="radio" id="rad2" name="rad" value="0" onclick="change(0)" /><label for="rad2">未审核</label> </td>
            </tr>
             <tr>
                <th>广告主余额：</th>
                <td><a id="ad_list" href="#"><span style='font-size:14px; color:Red;'><%= ad_balance %></span> 元<label>点击查看交易记录</label></a></td>
            </tr>
             <tr>
                <th>红包余额：</th>
                <td><a id="shared_list" href="#"><span style='font-size:14px; color:Red;'><%= shared_balance %></span> 元<label>点击查看交易记录</label></a></td>
            </tr>
            </tbody>
        </table>
    </div>
    <%-- <div class="tab_con">
        <table class="form_table">
            <col width="150px"><col>
            <tbody>
            <tr>
                <th>注册IP：</th>
                <td><asp:Label ID="lblRegIP" Text="-" runat="server"></asp:Label></td>
            </tr>
            </tbody>
        </table>
    </div>
--%>
    <div class="foot_btn_box">
    <asp:Button ID="btnSubmit" runat="server" Text="提交保存" CssClass="btnSubmit" 
            onclick="btnSubmit_Click" />
    &nbsp;    
        <asp:Button ID="btnReset" runat="server" Text="返回列表" CssClass="btnSubmit" onclick="btnReset_Click" Visible="false"/>
        <input type="button" class="btnSubmit" value="返回列表" onclick="javascript:window.location.href='list.html'"/>
    </div> 
</div>

　　<script src="../../Client/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
    <script src="../../Client/plugins/bootstrap-fileinput-master/js/fileinput.min.js" type="text/javascript"></script>
    <script src="../../Client/plugins/bootstrap-fileinput-master/js/fileinput_locale_zh.js" type="text/javascript"></script>
　

    <script type="text/javascript">
        $(function () {
            var state = "<%=state %>";
            if (state == "0")
                document.getElementById("rad2").checked = true;

            $("#imgAvatar").attr("src", ($("#txtAvatar").val() == "" ? "../img/no_avatar.png" : $("#txtAvatar").val()));
            $("#ad_list").bind("click", function () { window.location.href = '../fc_record/list.html?userid=' + getQueryString("id") });
            $("#shared_list").bind("click", function () { window.location.href = '../fc_record/list_shared.html?userid=' + getQueryString("id") });
            //文章logo
            $("#file_user_logo").fileinput({
                showUpload: false,
                showCaption: false,
                showPreview: false,
                browseLabel: '',
                browseClass: "",
                browseIcon: '<img src="../img/select.jpg"  id="Headpont" onclick="return Headpont_onclick()" />',
                removeClass: 'hide',
                fileType: "any",
                allowedFileExtensions: ['jpg', 'png', 'gif', 'bmp', 'jpeg']
            });

            //选择了图片提交图片
            $("#file_user_logo").change(function () {
                if ($(this).val().length == 0) {
                    toast.show("文件格式错误");
                    return;
                }
                wait.show();

                //选择好文件后提交表单
                $("#form1").ajaxSubmit({
                    type: 'post',
                    dataType: "json",
                    url: '../../Client/Ajax/Upload.ashx?Img&is_cut=1&width=100&height=100',
                    success: function (data) {
                        if (data.code == 0) {
                            wait.dismiss();
                            $("#txtAvatar").val(data.item);
                            $("#imgAvatar").attr("src", data.item);
                        }
                        else {
                            wait.dismiss();
                            toast.show(data.msg);
                        }
                    },
                    error: function (XmlHttpRequest, textStatus, errorThrown) {
                        wait.dismiss();
                        $("#file_user_logo").val("");
                    }
                });
            });
        });

        function change(s) {
            $("#state").val(s);
        }
    
    </script>
</form>
</body>
</html>
